const webpack = require('webpack');
const path = require('path');

module.exports = {
  entry: {
    bundle: [
      'react',
      'react-dom',
      'core-js',
      'office-ui-fabric-react',
      'moment',
      'moment-es6',
      'echarts',
      'html2canvas',
      'd3',
      'axios',
      'jquery',
      'echarts-for-react',
      'echarts-wordcloud',
      'react-router-dom',
      'classnames',
      'daterangepicker',
      'lodash',
      '@plantdata/sdk',
      '@zc/netchart'
    ],
  },
  output: {
    path: path.resolve('./build'),
    filename: '[name].js',
    library: '[name]_library'
  },
  plugins: [
    new webpack.optimize.UglifyJsPlugin(),
    new webpack.DllPlugin({
      path: path.resolve('./build/bundle.manifest.json'),
      name: '[name]_library',
    })
  ]
};
